object gh_com_FindPatient: Tgh_com_FindPatient
  OldCreateOrder = False
  OnCreate = SoapDataModuleCreate
  Height = 349
  Width = 700
  object dmcSql: TDCOMConnection
    ServerGUID = '{88E4A433-CEE0-11D3-AFFB-0080AD1E1788}'
    ServerName = 'wh_mts_tagsql.wh_mts_tag_sql'
    Left = 93
    Top = 29
  end
  object cdsSql: TClientDataSet
    Aggregates = <>
    Params = <>
    ProviderName = 'DSP_dict'
    RemoteServer = dmcSql
    Left = 143
    Top = 31
  end
  object dcmGetOrderNO: TDCOMConnection
    ServerGUID = '{7978FC30-6BFF-4744-9684-E5EE24EC8AB5}'
    ServerName = 'mzsf_dll_logic.FeePublic'
    Left = 89
    Top = 225
  end
  object cdsSvrDT: TClientDataSet
    Aggregates = <>
    Params = <>
    ProviderName = 'dspGetServerDateTime'
    RemoteServer = dcmGetOrderNO
    Left = 168
    Top = 227
  end
  object adcChis: TADOConnection
    ConnectionString = 
      'FILE NAME=C:\Program Files\Common Files\System\OLE DB\Data Links' +
      '\chis.udl'
    LoginPrompt = False
    Provider = 'SQLOLEDB.1'
    Left = 158
    Top = 118
  end
  object adqMzPatientMi: TADOQuery
    Connection = adcChis
    CursorType = ctStatic
    Parameters = <>
    SQL.Strings = (
      'select patient_id patient_id,'
      '       max_times times,'
      '       name name,'
      '       sex sex,'
      '       birthday birthday,'
      
        '       cast(datepart(yy,getdate())-datepart(yy,birthday) as floa' +
        't) age, '
      '       response_type response_type,'
      '       contract_code contract_code,'
      '       occupation_type occupation_type,'
      '       charge_type charge_type,'
      '       '#39#39' haoming_code,'
      '       '#39#39' code,'
      '       '#39#39' visit_dept,'
      '       '#39#39' doctor_code,'
      '       getdate() visit_date,'
      '       social_no,'
      '       '#39#39' real_haoming_code,'
      '       home_district,'
      '       home_street,'
      '       hic_no,'
      '       addition_no1,'
      '       home_tel,'
      '       relation_name,'
      '       relation_code,'
      '       max_times real_times,'
      '       outpatient_no'
      '       ,balance'
      '       ,local_flag'
      '       ,syx_card_no    ----'#22686#21152#29983#32946#20445#38505#35777#20214#21495' added by lugr 2013-04-10'
      '       ,yd_type  -----'#20248#24453#31867#22411' added by fzr 2013-11-11'
      'from mz_patient_mi')
    Left = 243
    Top = 122
    object adqMzPatientMipatient_id: TStringField
      FieldName = 'patient_id'
      FixedChar = True
      Size = 12
    end
    object adqMzPatientMitimes: TIntegerField
      FieldName = 'times'
    end
    object adqMzPatientMiname: TStringField
      FieldName = 'name'
      Size = 60
    end
    object adqMzPatientMisex: TStringField
      FieldName = 'sex'
      FixedChar = True
      Size = 1
    end
    object adqMzPatientMibirthday: TDateTimeField
      FieldName = 'birthday'
    end
    object adqMzPatientMiage: TFloatField
      FieldName = 'age'
    end
    object adqMzPatientMiresponse_type: TStringField
      FieldName = 'response_type'
      Size = 2
    end
    object adqMzPatientMicontract_code: TStringField
      FieldName = 'contract_code'
      Size = 6
    end
    object adqMzPatientMioccupation_type: TStringField
      FieldName = 'occupation_type'
      Size = 4
    end
    object adqMzPatientMicharge_type: TStringField
      FieldName = 'charge_type'
      Size = 2
    end
    object adqMzPatientMihaoming_code: TStringField
      FieldName = 'haoming_code'
      Size = 2
    end
    object adqMzPatientMicode: TStringField
      FieldName = 'code'
    end
    object adqMzPatientMivisit_dept: TStringField
      FieldName = 'visit_dept'
      Size = 7
    end
    object adqMzPatientMidoctor_code: TStringField
      FieldName = 'doctor_code'
      Size = 5
    end
    object adqMzPatientMivisit_date: TDateTimeField
      FieldName = 'visit_date'
    end
    object adqMzPatientMisocial_no: TStringField
      FieldName = 'social_no'
      Size = 18
    end
    object adqMzPatientMireal_haoming_code: TStringField
      FieldName = 'real_haoming_code'
      Size = 2
    end
    object adqMzPatientMihome_district: TStringField
      FieldName = 'home_district'
      Size = 6
    end
    object adqMzPatientMihome_street: TStringField
      FieldName = 'home_street'
      Size = 50
    end
    object adqMzPatientMihic_no: TStringField
      FieldName = 'hic_no'
      Size = 10
    end
    object adqMzPatientMiaddition_no1: TStringField
      FieldName = 'addition_no1'
    end
    object adqMzPatientMihome_tel: TStringField
      FieldName = 'home_tel'
      Size = 16
    end
    object adqMzPatientMirelation_name: TStringField
      FieldName = 'relation_name'
      Size = 32
    end
    object adqMzPatientMirelation_code: TStringField
      FieldName = 'relation_code'
      FixedChar = True
      Size = 2
    end
    object adqMzPatientMireal_times: TIntegerField
      FieldName = 'real_times'
    end
    object adqMzPatientMioutpatient_no: TStringField
      FieldName = 'outpatient_no'
      Size = 12
    end
    object adqMzPatientMibalance: TFloatField
      FieldName = 'balance'
    end
    object adqMzPatientMilocal_flag: TStringField
      FieldName = 'local_flag'
      FixedChar = True
      Size = 1
    end
    object adqMzPatientMisyx_card_no: TStringField
      FieldName = 'syx_card_no'
    end
    object adqMzPatientMiyd_type: TStringField
      FieldName = 'yd_type'
      Size = 3
    end
  end
  object dspMzPatientMi: TDataSetProvider
    DataSet = adqMzPatientMi
    Options = [poAllowCommandText]
    Left = 324
    Top = 121
  end
  object dspMzPatientMi_b: TDataSetProvider
    DataSet = adqMzPatientMi_b
    Options = [poAllowCommandText]
    Left = 328
    Top = 177
  end
  object adqMzPatientMi_b: TADOQuery
    Connection = adcChis
    CursorType = ctStatic
    Parameters = <>
    SQL.Strings = (
      'select patient_id patient_id,'
      '       max_times times,'
      '       name name,'
      '       sex sex,'
      '       birthday birthday,'
      
        '       cast(datepart(yy,getdate())-datepart(yy,birthday) as floa' +
        't) age, '
      '       response_type response_type,'
      '       contract_code contract_code,'
      '       occupation_type occupation_type,'
      '       charge_type charge_type,'
      '       '#39#39' haoming_code,'
      '       '#39#39' code,'
      '       '#39#39' visit_dept,'
      '       '#39#39' doctor_code,'
      '       getdate() visit_date,'
      '       social_no,'
      '       '#39#39' real_haoming_code,'
      '       home_district,'
      '       home_street,'
      '       hic_no,'
      '       addition_no1,'
      '       home_tel,'
      '       relation_name,'
      '       relation_code,'
      '       max_times real_times,'
      '       outpatient_no '
      '       ,balance'
      '       ,local_flag'
      '       ,syx_card_no   -----'#22686#21152#29983#32946#20445#38505#35777#20214#21495' added by lugr 2013-04-10'
      '       ,yd_type'
      'from mz_patient_mi_b ')
    Left = 243
    Top = 178
    object adqMzPatientMi_bpatient_id: TStringField
      FieldName = 'patient_id'
      FixedChar = True
      Size = 12
    end
    object adqMzPatientMi_btimes: TIntegerField
      FieldName = 'times'
    end
    object adqMzPatientMi_bname: TStringField
      FieldName = 'name'
      FixedChar = True
      Size = 60
    end
    object adqMzPatientMi_bsex: TStringField
      FieldName = 'sex'
      FixedChar = True
      Size = 1
    end
    object adqMzPatientMi_bbirthday: TDateTimeField
      FieldName = 'birthday'
    end
    object adqMzPatientMi_bage: TFloatField
      FieldName = 'age'
    end
    object adqMzPatientMi_bresponse_type: TStringField
      FieldName = 'response_type'
      FixedChar = True
      Size = 2
    end
    object adqMzPatientMi_bcontract_code: TStringField
      FieldName = 'contract_code'
      FixedChar = True
      Size = 6
    end
    object adqMzPatientMi_boccupation_type: TStringField
      FieldName = 'occupation_type'
      FixedChar = True
      Size = 4
    end
    object adqMzPatientMi_bcharge_type: TStringField
      FieldName = 'charge_type'
      Size = 2
    end
    object adqMzPatientMi_bhaoming_code: TStringField
      DisplayWidth = 2
      FieldName = 'haoming_code'
      Size = 2
    end
    object adqMzPatientMi_bcode: TStringField
      FieldName = 'code'
    end
    object adqMzPatientMi_bvisit_dept: TStringField
      FieldName = 'visit_dept'
      Size = 7
    end
    object adqMzPatientMi_bdoctor_code: TStringField
      FieldName = 'doctor_code'
      Size = 5
    end
    object adqMzPatientMi_bvisit_date: TDateTimeField
      FieldName = 'visit_date'
    end
    object adqMzPatientMi_bsocial_no: TStringField
      FieldName = 'social_no'
      FixedChar = True
      Size = 18
    end
    object adqMzPatientMi_breal_haoming_code: TStringField
      FieldName = 'real_haoming_code'
      Size = 2
    end
    object adqMzPatientMi_bhome_district: TStringField
      FieldName = 'home_district'
      Size = 6
    end
    object adqMzPatientMi_bhome_street: TStringField
      FieldName = 'home_street'
      Size = 50
    end
    object adqMzPatientMi_bhic_no: TStringField
      FieldName = 'hic_no'
      Size = 10
    end
    object adqMzPatientMi_baddition_no1: TStringField
      FieldName = 'addition_no1'
    end
    object adqMzPatientMi_bhome_tel: TStringField
      FieldName = 'home_tel'
      Size = 16
    end
    object adqMzPatientMi_brelation_name: TStringField
      FieldName = 'relation_name'
      Size = 32
    end
    object adqMzPatientMi_brelation_code: TStringField
      FieldName = 'relation_code'
      FixedChar = True
      Size = 2
    end
    object adqMzPatientMi_breal_times: TIntegerField
      FieldName = 'real_times'
    end
    object adqMzPatientMi_boutpatient_no: TStringField
      FieldName = 'outpatient_no'
      Size = 12
    end
    object adqMzPatientMi_bbalance: TFloatField
      FieldName = 'balance'
    end
    object adqMzPatientMi_blocal_flag: TStringField
      FieldName = 'local_flag'
      FixedChar = True
      Size = 1
    end
    object adqMzPatientMi_bsyx_card_no: TStringField
      FieldName = 'syx_card_no'
    end
    object adqMzPatientMi_byd_type: TStringField
      FieldName = 'yd_type'
      Size = 3
    end
  end
  object cdsMzPatientMi: TClientDataSet
    Aggregates = <>
    Params = <
      item
        DataType = ftString
        Name = 'outpatient_no'
        ParamType = ptInput
      end
      item
        DataType = ftString
        Name = 'inpatient_no'
        ParamType = ptInput
      end
      item
        DataType = ftString
        Name = 'social_no'
        ParamType = ptInput
      end
      item
        DataType = ftString
        Name = 'hic_no'
        ParamType = ptInput
      end
      item
        DataType = ftString
        Name = 'p_bar_code'
        ParamType = ptInput
      end
      item
        DataType = ftString
        Name = 'patient_id'
        ParamType = ptInput
      end
      item
        DataType = ftString
        Name = 'addition_no1'
        ParamType = ptInput
      end>
    ProviderName = 'dspMzPatientMi'
    Left = 411
    Top = 124
  end
  object cdsMzPatientMi_b: TClientDataSet
    Aggregates = <>
    Params = <
      item
        DataType = ftString
        Name = 'outpatient_no'
        ParamType = ptInput
      end
      item
        DataType = ftString
        Name = 'inpatient_no'
        ParamType = ptInput
      end
      item
        DataType = ftString
        Name = 'social_no'
        ParamType = ptInput
      end
      item
        DataType = ftString
        Name = 'hic_no'
        ParamType = ptInput
      end
      item
        DataType = ftString
        Name = 'p_bar_code'
        ParamType = ptInput
      end
      item
        DataType = ftString
        Name = 'patient_id'
        ParamType = ptInput
      end
      item
        DataType = ftString
        Name = 'addition_no1'
        ParamType = ptInput
      end>
    ProviderName = 'dspMzPatientMi_b'
    Left = 401
    Top = 181
  end
  object dmcGhConfig: TDCOMConnection
    ServerGUID = '{26B052A9-7F2E-4CBC-8BCC-16B72D7A0FF7}'
    ServerName = 'mzgh_dll_data.gh_config'
    Left = 247
    Top = 65
  end
  object cdsGeneratePatientID: TClientDataSet
    Aggregates = <>
    Params = <>
    ProviderName = 'dspGhConfig'
    RemoteServer = dmcGhConfig
    Left = 387
    Top = 60
  end
  object adqGetOrderNo: TADOQuery
    Connection = adcChis
    CursorType = ctStatic
    Parameters = <
      item
        Name = 'patient_id'
        DataType = ftString
        NumericScale = 255
        Precision = 255
        Size = 12
        Value = '11'
      end
      item
        Name = 'times'
        Attributes = [paSigned]
        DataType = ftInteger
        Precision = 10
        Size = 4
        Value = 1
      end>
    SQL.Strings = (
      'SELECT  DISTINCT mz_detail_charge.order_type,'
      '        mz_detail_charge.order_no,'
      '        mz_zd_order_type.name,'
      '        mz_zd_order_type.drug_cure,'
      '        mz_zd_order_type.group_no ,'
      '        mz_detail_charge.caoyao_fu'
      ' FROM mz_detail_charge,mz_zd_order_type'
      ' where mz_detail_charge.patient_id=:patient_id and'
      '        mz_detail_charge.times=:times and'
      '        mz_detail_charge.charge_status in ('#39'1'#39')'
      ' and'
      '        mz_detail_charge.order_type=mz_zd_order_type.code'
      ''
      ''
      ''
      ' ')
    Left = 252
    Top = 255
  end
  object dspGetItemOrderNo: TDataSetProvider
    DataSet = adqGetOrderNo
    Left = 356
    Top = 255
  end
end
